package cn.taketoday.live;

import java.io.Serializable;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * @author TODAY
 * @date 2020/9/10 11:04
 */
public interface Constant extends Serializable {
  String[] EMPTY_STRING_ARRAY = new String[0];

  String SUPER_WORKING_UNIT = "成都市非遗保护中心";

  String MASK = "***";

  String DEFAULT = "default";
  String PUBLISHED = "published";

  int BUFFER_SIZE = 8 * 1024;

  String FEATURED = "精选"; // 精选标签
  String WORK_FILE = "work-file";
  String SHARING_FILE = "sharing-file";
  String MATERIAL_FILE = "material-file";

  String SPLIT_STRING = ",";

  /** Bytes per Kilobyte. */
  long BYTES_PER_KB = 1024;
  /** Bytes per Megabyte. */
  long BYTES_PER_MB = BYTES_PER_KB * 1024;
  /** Bytes per Gigabyte. */
  long BYTES_PER_GB = BYTES_PER_MB * 1024;
  /** Bytes per Terabyte. */
  long BYTES_PER_TB = BYTES_PER_GB * 1024;

  /** 默认时间格式 */
  String DEFAULT_TIME_FORMAT = "HH:mm:ss";
  /** 默认日期格式 */
  String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
  /** 默认日期时间格式 */
  String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
  String KEY_USER_SESSION = "userSession";

  //

  long STARTUP_TIME = System.currentTimeMillis();

  String BLANK = "";

  String PARAMETER_SIZE = "size";
  String PARAMETER_CURRENT = "current";

  String NOT_FOUND = "Not Found";
  String BAD_REQUEST = "Bad Request";
  String UNAUTHORIZED = "Unauthorized";
  String ACCESS_FORBIDDEN = "Access Forbidden";
  String METHOD_NOT_ALLOWED = "Method Not Allowed";
  String INTERNAL_SERVER_ERROR = "Internal Server Error";

  String OPERATION_OK = "ok";
  String OPERATION_FAILED = "failed";

  String DEFAULT_ENCODING = "UTF-8";
  Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

  int DEFAULT_LIST_SIZE = 10;

  String CONTENT_TYPE = "Content-Type";
  String DEFAULT_CONTENT_TYPE = "text/html;charset=UTF-8";
  String CONTENT_TYPE_JSON = "application/json;charset=UTF-8";

  String FOLDER_SEPARATOR = "/";
  char PACKAGE_SEPARATOR = '.';
  char EXTENSION_SEPARATOR = PACKAGE_SEPARATOR;

}
